package ecscore

import (
	"reflect"
)

// / tells the id of `Entity`
type EntityId = uint32

var entityIdType reflect.Type

// / static init
func init() {
	var empty EntityId
	entityIdType = reflect.TypeOf(empty)
}

// / EntityStorage interface manages storing, mutating and querying a
// / set of entities, described by their components
type EntityStorage interface {
	AddEnt(EntityId, ...interface{})
	DeleteEnt(EntityId)
	// returns a series of interface
	Get(EntityId) []interface{}
	GetComponent(EntityId, reflect.Type) interface{}
	RemoveComponent(EntityId, reflect.Type)
	AddComponent(EntityId, interface{})
	FindAll([]reflect.Type) []EntityId
}

// / an iterator for query entity
type EntityIterator interface {
	Next() bool
	Current() interface{}
}
